<script>
window.addEventListener('message', function () {
  var exc = null;
  try {
    newWindow.document;
  } catch (e) {
    exc = e;
  }
  top.postMessage(exc ? '' + exc : null, '*');
});
newWindow = window.open('file-origin-window-open-popup.html');
</script>
